#include <inttypes.h>
#include "GlobalDefinitions.h"

#include "ADC.h"
#include <avr/io.h>

void ADC_init(void)
{

	ADMUX = (0<<REFS1) | (0<<REFS1) | (0<<ADLAR); //AREF, Internal Vref turned off
	ADCSRA = (1<<ADEN) | (1<<ADFR)  | (1<<ADPS2)| (1<<ADPS1)| (1<<ADPS0)|(1<<ADSC); //enabling adc


	

}

void setADCChannel(uint8_t channel)
{
	if(channel >= 0 || channel <= 4)
	{
		ADMUX |=  (0x0F & channel);
	}

}
